<template>
  <div id="app">
  	<div class="">
  		<p class="headP">省纪委监委协同办公系统<span class="headSpan">admin &nbsp; <i class="el-icon-arrow-down"></i></span><img class="headImg" src="../build/logo.png"/></p>
  		<p class="menuP">
  			<span v-for="(item,index) in topLi" :class="activeIndex==index?'active':''" @click="chooseMenu(item.val,index)">{{item.name}}</span>
  		</p>
  	</div>

    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  data(){
  	return{
  		activeIndex:0,
  		topLi:[
  				{
  					name:'首页',
  					val:'index'
  				},
  				{
  					name:'组织机构',
  					val:'index'
  				},
  				{
  					name:'安全邮件',
  					val:'index'
  				},
  				{
  					name:'公文与业务',
  					val:'index'
  				},
  				{
  					name:'专项督办',
  					val:'index'
  				},
  				{
  					name:'综合查询',
  					val:'index'
  				},
  				{
  					name:'知识库管理',
  					val:'index'
  				},
  				{
  					name:'个人事务',
  					val:'index'
  				},
  				{
  					name:'日常事务',
  					val:'shiwu'
  				},
  				{
  					name:'通知公告',
  					val:'index'
  				},
  				{
  					name:'系统管理',
  					val:'index'
  				},
  		],
  	}
  },
  methods:{
  	chooseMenu(val,index){/*选中这个栏目*/
  		this.activeIndex = index;
  		this.$router.push({name:val});
  	}
  }
}
</script>

<style>
#app {
	margin: 0;
	padding: 0;
  font-family: "Microsoft Yahei";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #EDEDED;
  height: 100%;
  overflow-x: hidden;
  /* overflow-y: hidden; */
}
*{
		margin: 0;
	padding: 0;
}
.headP{
	background: #125AD2;
    padding: 15px 15px;
    height: 20px;
    line-height: 20px;
    color: #fff;
    font-size: 20px;
}

.headSpan{
		float: right;
    font-size: 12px;
    line-height: 20px;
    margin: 0 10px;
    font-weight: bold;
}
.headImg{
	float: right;
	width: 45px;
  margin-top: -8px;

}
.menuP{
	     background: #fff;
    padding: 15px 0px;
    /*margin: 10px 0;*/
}
.menuP span{
	margin: 0 10px;
	cursor: pointer;
	padding: 5px 5px;
  border-radius: 5px;
  letter-spacing: 2px;
  font-size: 16px;
  color: #333;
  font-weight: bold;
}
.menuP span.active{
	background: #125AD2;
	color: #fff;
}
</style>
